<tagLib name="html" />
{$header}
<div id="main" class="main" >
<!-- 主体内容  -->
<div class="content" >
  
<!--  功能组区域  -->
<div class="btn-toolbar">
      <div class="btn-group">
  	<button class="btn btn-primary" onclick="add()"><i class="icon-plus icon-white"></i> 新增</button>
  	<button class="btn btn-primary" onclick="edit()"><i class="icon-edit icon-white"></i> 编辑</button>
  	<button class="btn btn-primary" onclick="foreverdel()"><i class="icon-trash icon-white"></i> 删除</button>
    <?php $ods = C('sampleQcStatus'); ?>
    <foreach name="ods" item="vo">
      <a href="__URL__/index/sample_qc_status/{$key}" class="btn"><i class="icon-th-list"></i>{$vo}</a>
    </foreach>
    </div>
    <form class="search-form " method='get' action="__URL__">
      <select name="time_type" class="span1"> 
      <option value="1" <eq name="_REQUEST.time_type" value="1">selected</eq> >出图时间</option> 
      <!--<option value="2" <eq name="_REQUEST.time_type" value="2">selected</eq> >创建时间</option>  -->
    </select>
    从<input type="text" class="span2"  name="start_time" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<notempty name='_REQUEST.start_time'>{$_REQUEST.start_time}</notempty>">
    到<input type="text" class="span2" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" name="end_time" id="end_time" value="<notempty name='_REQUEST.end_time'>{$_REQUEST.end_time}</notempty>" >
    
      货前样检测状态：{:configList(C('sampleQcStatus'),$_REQUEST['sample_qc_status'],'sample_qc_status' )}
      入库质量管理：{:configList(C('inQcStatus'),$_REQUEST['in_qc_status'],'in_qc_status' )}
      核磁结果：{:configList(C('nuclear_result'),$_REQUEST['nuclear_result'],'nuclear_result' )}
      <input type="text" class="search-query span3" name="supplier" <notempty name='_REQUEST.supplier'>
        <php>echo 'value="'.urldecode($_REQUEST['supplier']).'"'</php>
        <else/>
        placeholder="供应商"
      </notempty> >
      <input type="text" class="search-query span1" name="order_detail_mano" <notempty name='_REQUEST.order_detail_mano'>
    <php>echo 'value="'.urldecode($_REQUEST['order_detail_mano']).'"'</php>
    <else/>
      placeholder="销售单号"
    </notempty>
    >
      <input type="text" class="search-query span4" name="keywords" <notempty name='_REQUEST.keywords'>
            <php>echo 'value="'.urldecode($_REQUEST['keywords']).'"'</php><else/>
            placeholder="采购单号，销售订单分号，产品中文，英文名，CAS号"
        </notempty>
        >
        <input type="submit" class="btn btn-primary" value="搜索">
  </form>
          
  </div>
<!-- 功能组区域结束 -->
<php>
    function getMano($oid){
      return getModelName($oid,'Order_detail','mano');
  }

  function getSupplierLink($sid){
    $supplier = getSupplierAndRank($sid);
    return '<a href="__APP__/Supplier/edit/id/'.$sid.'" target="_blank">'.$supplier.'</a>';
}
</php>
<!-- 列表显示区域  -->
<div class="list" >
 <div class="btn-toolbar">
  <div class="btn-group">
   <a href="__URL__/index/nuclear_result/0" class="btn"><i class="icon-th-list"></i>核磁默认值</a>
   <a href="__URL__/index/nuclear_result/1" class="btn"><i class="icon-th-list"></i>核磁待确认</a>
    <?php $ods = C('inQcStatus'); ?>
    <foreach name="ods" item="vo">
      <a href="__URL__/index/in_qc_status/{$key}" class="btn"><i class="icon-th-list"></i>{$vo}</a>
    </foreach>
    
  </div>
</div>
<div id="result" class="result none"></div><html:list id="checkList" style="table table-bordered table-striped" name="action" checkbox="true" action="true" datasource="list" show="id:编号|5%:edit,mano:采购单号,order_detail_id|getMano:销售订单分号,order_detail_id|getMsgTip:备注,priority|getConfigVal=Priority:优先级,pname:产品,pename:英文名,cas:CAS,supplier_id|getSupplierLink:供应商,total:总价,user_id|getModelName=User:经办人,create_time|toDate:采购时间,status|getConfigVal=buyStatus:状态,nuclear_drawing|showMoreTip:核磁分析,nuclear_result|getConfigVal=nuclear_result:核磁结果,nuclear_drawing_time|toDate:核磁出图时间,in_qc_status|getConfigVal=inqcstatus:入库质量管理,sample_qc_status|getConfigVal=sampleQcStatus:货前样质量管理,qc_guide:质检指南" actionlist="edit:详情:id" />
</div>
<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->
</div>
<!-- 主体内容结束 -->
</div>
<!-- 主页面结束 --><include file="Public:footer"/>
<script type="text/javascript">
  function fastadd(){
    location.href=URL+"/fastadd";
  }

  function quicksale(id){
    var keyValue;
    if (id)
    {
      keyValue = id;
    }else {
      keyValue = getSelectCheckboxValues();
    }
    if (!keyValue)
    {
      alert('请选择入库单！');
      return false;
    }
    location.href=APP+"/Sale/fastadd/enter_id/"+keyValue;
  }
</script>


<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
